home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / serverlib / include / logprepare.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  3.3 KB  |  129 lines

  1. /*
  2.  *   $RCSfile: logprepare.h,v $  
  3.  *   $Revision: 1.1.1.1 $  
  4.  *   $Date: 1996/05/04 21:55:45 $      
  5.  */ 
  6. #ifndef __LOGPREPARE_H__
  7. #define __LOGPREPARE_H__
  8.  
  9. /**********************************************************************
  10. * EXODUS Database Toolkit Software
  11. * Copyright (c) 1991 Computer Sciences Department, University of
  12. *                    Wisconsin -- Madison
  13. * All Rights Reserved.
  14. *
  15. * Permission to use, copy, modify and distribute this software and its
  16. * documentation is hereby granted, provided that both the copyright
  17. * notice and this permission notice appear in all copies of the
  18. * software, derivative works or modified versions, and any portions
  19. * thereof, and that both notices appear in supporting documentation.
  20. *
  21. * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
  22. * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.  
  23. * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  24. * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  25. *
  26. * The EXODUS Project Group requests users of this software to return 
  27. * any improvements or extensions that they make to:
  28. *
  29. *   EXODUS Project Group 
  30. *     c/o David J. DeWitt and Michael J. Carey
  31. *   Computer Sciences Department
  32. *   University of Wisconsin -- Madison
  33. *   Madison, WI 53706
  34. *
  35. *     or exodus@cs.wisc.edu
  36. *
  37. * In addition, the EXODUS Project Group requests that users grant the 
  38. * Computer Sciences Department rights to redistribute these changes.
  39. **********************************************************************/
  40.  
  41. /*
  42.  *    define the maximum number of PREPARESERVERINFO records 
  43.  *    in an image
  44.  */
  45. #define        MAXSERVERSINIMAGE    20
  46.  
  47. /*
  48.  *    for distr trans -
  49.  *    define the header to the coordinator's prepare log record 
  50.  *    - this will be the first image
  51.  */
  52. typedef struct    {
  53.     
  54.     UFOUR        numServers;
  55.     ONE            prepareAndCommit;
  56.     LSN            prepareLSN;
  57.     SHORTPID    firstLogPid;
  58.     UFOUR        logUnique;
  59.     LSN            firstLSN;
  60.     UFOUR       logRecordCount;
  61.     UFOUR       logSpace;
  62. } COORDPREPAREHDR;
  63.  
  64. /*
  65.  *    for distr trans -
  66.  *    define the structure which stores the info about
  67.  *    a server in the prepare log record
  68.  */
  69. typedef struct    {
  70.     
  71.     SOCKADDR    connectAddr;
  72.     TID            tid;
  73. } PREPARESERVERINFO;
  74.  
  75. /*
  76.  *    define the maximum number of PREPARELOCKINFO records allocated
  77.  *    on the stack in server_LogPrepare()
  78.  */
  79. #define        MAXLOCKSONSTACK    100
  80.  
  81. /*
  82.  *    define the maximum number of PREPARELOCKINFO records that
  83.  *    can be stored in one image
  84.  */
  85. #define        MAXLOCKINFOINIMAGE    (MAX_LOGIMAGE_LEN / sizeof(PREPARELOCKINFO))
  86.  
  87. /*
  88.  *    define the maximum number of VOLIDNAME records allocated
  89.  *    on the stack in server_LogPrepare()
  90.  *    VOLIDNAME is declared in serverlib/include/volume.h
  91.  */
  92. #define        MAXVOLSONSTACK    100
  93.  
  94. /*
  95.  *    define the maximum number of VOLIDNAME records that
  96.  *    can be stored in one image
  97.  */
  98. #define        MAXVOLINIMAGE    (MAX_LOGIMAGE_LEN / sizeof(VOLIDNAME))
  99.  
  100. /*
  101.  *    for distr trans -
  102.  *    define the header to the server's prepare log record 
  103.  *    - this will be the first image
  104.  */
  105. typedef struct    {
  106.  
  107.     SOCKADDR    coordAddr;
  108.     TID            coordTid;
  109.     LSN            prepareLSN;
  110.     SHORTPID    firstLogPid;
  111.     UFOUR        logUnique;
  112.     LSN            firstLSN;
  113.     UFOUR       logRecordCount;
  114.     UFOUR       logSpace;
  115. } SERVERPREPAREHDR;
  116.  
  117. /*
  118.  *    for distr trans -
  119.  *    define the structure which stores the info about
  120.  *    a lock in the prepare log record
  121.  */
  122. typedef struct    {
  123.     
  124.     LOCKID        lockid;
  125.     LOCKMODE    mode;
  126. } PREPARELOCKINFO;
  127.  
  128. #endif __LOGPREPARE_H__
  129.